package com.ymatou.iapi.cardservice.service;

import java.util.Map;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;

public class BindingCardCall extends YmatouAutoTestCall {
	private static String opurl = "/api/card/bindingCard";

	public BindingCardCall() {
		super(EnvSetup.getSystemUrl("cardservice"), opurl, "POST", "JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	public JSONObject call(String cardPwd, int userId, String userName) {
		return this.callAndGetReturnData(MapUtil.hashMap("cardPwd", cardPwd,
				"userId", userId, "userName", userName));
	}
	public JSONObject call(String cardPwd, int userId, String userName,
			String appId) {
		return this.callAndGetReturnData(MapUtil.hashMap("cardPwd", cardPwd,
				"userId", userId, "appId", appId, "userName", userName));
	}

	public JSONObject call(Map<String, Object> updateMap) {
		return this.callAndGetReturnData(updateMap);
	}

}
